const {
  override,
  addDecoratorsLegacy,
  disableEsLint,
  addBundleVisualizer,
  addWebpackAlias,
  adjustWorkbox 
} = require("customize-cra");
const path = require("path");
 
module.exports = override(
  // enable legacy decorators babel plugin
//   addDecoratorsLegacy(),
 
  // disable eslint in webpack
  // 禁用eslint语法检测
  disableEsLint(),
 
  // add webpack bundle visualizer if BUNDLE_VISUALIZE flag is enabled
//   process.env.BUNDLE_VISUALIZE == 1 && addBundleVisualizer(),
 
  // add an alias for "ag-grid-react" imports
  addWebpackAlias({
      // 改别名，跟vue中的@一样，@默认src目录
      // resolve路径拼接
    ["@"]: path.resolve(__dirname, "src")
  }),
 
  // adjust the underlying workbox
//   adjustWorkbox(wb =>
//     Object.assign(wb, {
//       skipWaiting: true,
//       exclude: (wb.exclude || []).concat("index.html")
//     })
//   )
);